package com.olympus.hermes.product.controller;

import com.olympus.hermes.product.bean.dto.product.CreateProductDTO;
import com.olympus.hermes.product.service.ProductService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * @author Mickey
 * @since 2021/2/5
 */
@RestController
@RequestMapping("/product")
@AllArgsConstructor
public class ProductController {

    private final ProductService productService;

    @PostMapping("/create")
    public void create(@RequestBody @Valid CreateProductDTO createProduct) {
        productService.create(createProduct);
    }

}
